package com.fu.jdbc01.service;


import com.fu.jdbc01.dao.StudentDao;
import com.fu.jdbc01.dao.StudentDaoImpl;
import com.fu.jdbc01.domain.Student;

import java.util.ArrayList;

public class StudentServiceImpl implements StudentService {
    private StudentDao studentDao = new StudentDaoImpl();


    @Override
    public ArrayList<Student> findAll() {
        return studentDao.findAll();
    }

    @Override
    public Student findById(Integer id) {
        return studentDao.findById(id);
    }

    @Override
    public int insert(Student stu) {
        return studentDao.insert(stu);
    }

    @Override
    public int update(Student stu) {
        return studentDao.update(stu);
    }

    @Override
    public int delete(Integer id) {
        return studentDao.delete(id);
    }


}
